<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of home
 *
 * @author pudy
 */
class Home extends CI_Controller {

    function index() {
        $user_id = $this->session->userdata('user_id');
        $user_username = $this->session->userdata('username');

        $data['title'] = $user_username . '\'s Home';
        $data['main_content'] = 'home_view';
        $data['user_id'] = $user_id;

        /* get all user's pois */
        $this->load->model('poiModel', 'poiModel');
        $options = array('user_id' => $user_id,
            'columnSelect' => 'id, title');
        $getReturnPois = $this->poiModel->getPois($options);
        $poi_list = $getReturnPois;
        $data['poi_list'] = $poi_list;
        /* end of get all user's pois */

        $this->load->view('includes/template', $data);
    }

}

?>
